Recently, NAND-type flash memory has attracted attention as a type of nonvolatile semiconductor memory. Writing/erasing operations of the NAND-type flash memory are faster than those of NOR-type flash memory. Further, due to the development of manufacturing techniques of semiconductor devices, downsizing of semiconductor elements has been advanced, and memory capacity per unit area has been increasing. Large capacity memory systems using the NAND-type flash memory have been already commercialized.
Generally in a NAND-type flash memory, a plurality of pages are collected to form one block. A writing/reading process is performed in a unit of page, and an erasing process is performed in a unit of block (for example, see Patent Document 1).
Further, with recent development of information technology, many large capacity files, for example, of a size exceeding several megabytes, such as image files, music files, and video files are stored in a secondary storage device such as a personal computer. In the case of applying a memory system using a NAND-type flash memory, for example, with a page size of 4 kilobytes as the secondary storage device, and when a file considerably larger than a page size, which is a write unit in the NAND-type flash memory, is written, there is a problem that writing must be performed for each page (4 kilobytes), and therefore it requires a long time for writing the file. On the other hand, if a write size per page is increased to improve the efficiency of writing of a large-capacity file, an unused area is generated in a page at the time of writing a file smaller than the page size.
Further, a rewriting process of data in the NAND-type flash memory requires processes of saving the data once in a memory such as a dynamic random access memory (DRAM), updating a page to be rewritten on the memory, writing data constituting a block including the updated page in a block from which data has already been erased and different from the block currently storing the data, and erasing an original block. Therefore, at the time of writing a file having a small capacity as compared to the block size and having high rewriting frequency, an unused area is generated in a page and the number of useless erasure increases. Accordingly, the writing efficiency, which is a ratio of an amount of data erased to an amount of data written, decreases to deteriorate a cell constituting the block.
Japanese Patent Application Laid-open No. 2007-279402
It is an object of the present invention to provide a memory system that can store data smaller than a block size as well as data larger than the block size, without deteriorating the writing efficiency.